package com.rightsidetech.system.dtos.request.store;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.math.BigDecimal;

@Data
public class AddSysStoreInfoReq implements Serializable {

    @ApiModelProperty("门店名称")
    @NotBlank(message = "门店名称必填项不能为空")
    @Length(max = 20,message = "门店名称长度过长")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9-_]{0,}$", message = "门店名称不能包含特殊符号")
    private String storeName;

    @NotBlank(message = "门店照片必填项不能为空")
    @ApiModelProperty("门店照片")
    @Pattern(regexp = "^http://.*|https://.*",message = "门店照片参数格式错误")
    @Length(max = 255,message = "门店照片长度过长")
    private String storeImage;

    @NotBlank(message = "负责人必填项不能为空")
    @ApiModelProperty("负责人")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{2,6}$", message = "负责人为2-6位中文")
    private String storeBoss;

    @NotBlank(message = "手机号必填项不能为空")
    @ApiModelProperty("联系方式")
    @Pattern(regexp = "^1[0-9]{10}$",message = "手机号格式错误")
    private String connectWay;

    @ApiModelProperty(value = "代理商id",hidden = true)
//    @NotNull(message = "代理商id不能为空")
    private Long sysAgentInfoId;

    @ApiModelProperty("经度")
    @NotNull(message = "经度坐标必填项不能为空")
    private BigDecimal longitude;

    @ApiModelProperty("纬度")
    @NotNull(message = "纬度坐标必填项不能为空")
    private BigDecimal latitude;

    @ApiModelProperty("地址")
    @NotBlank(message = "地址必填项不能为空")
    @Length(max = 50, message = "地址长度过长")
    @Pattern(regexp = "^[0-9a-zA-Z()（）,.?!，。？“”·、\\s+\\-\"=\\u4e00-\\u9fa5]{0,}$", message = "地址不支持特殊字符")
    private String adress;

    @ApiModelProperty("门牌号(详细地址)")
    @Length(max = 20, message = "详细地址长度过长")
    @Pattern(regexp = "^[0-9a-zA-Z()（）,.?!，。？“”·、\\s+\\-\"=\\u4e00-\\u9fa5]{0,}$", message = "详细地址不支持特殊字符")
    private String doorplate;

    @ApiModelProperty(value = "门店等级",hidden = true)
    @Length(max = 50, message = "门店等级长度过长")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{0,}$", message = "门店等级为中文")
    private String gradeName;

    @ApiModelProperty(value = "店铺编号(不传)",hidden = true)
    private String storeNumber;

    @ApiModelProperty(value = "店铺二维码(不传)",hidden = true)
    private String codeImage;


}